<table class="table table-hover  table-responsive ">
    <thead class="navbar-inner">
    <tr>
        <th style="width:25px;"><input type='checkbox' class="checkall"/></th>
        <th style='width:180px;'>订单编号</th>
        <th>订单金额</th>
        <th>可提现金额</th>
        <th>抽成比例</th>
        <th>抽成后获得金额</th>
        <th>订单完成时间</th>
        <th style='width:80px;'>状态</th>
    </tr>
    </thead>
</table>
<div style="max-height:500px;overflow:auto;border:none; overflow-x:hidden;">
    <table class="table table-hover  table-responsive " style="table-layout: fixed;border:none;">
        <tbody>
        {foreach name='list' item='row'}
        <tr class="orderlist" data="{$row['id']}">
            <td style="width:25px;"><input type='checkbox' class="checkitem" value="{$row['id']}"/></td>
            <td style="width:180px;" data-toggle="tooltip" title="{$row['nickname']}" style="width:80px;">
                {$row['ordersn']}
            </td>
            <td>{$row['orderprice']}</td>
            <td >{$row['realprice']}</td>
            <td>{$row['payrate']}%</td>
            <td>{:round($row['realpricerate'],2)}</td>
            <td>{:date('Y-m-d H:i:s',$row['finishtime'])}</td>
            <td style='width:80px;cursor: pointer'>{if empty($row['merchapply'])}
                <span class="label label-default">等待</span>
                {elseif $row['merchapply']==1}
                <span class="label label-primary">提交申请</span>
                {elseif $row['merchapply']==-1}
                <span class="label label-danger">拒绝申请</span>
                {elseif $row['merchapply']==2}
                <span class="label label-primary">通过申请</span>
                {elseif $row['merchapply']==3}
                <span class="label label-primary">完成打款</span>
                {/if}
            </td>
        </tr>
        <tr >
            <td colspan='8' style="padding: 0">
                <table class='ordertable' style='table-layout:fixed;display: none;' id="orderinfo_{$row['id']}">
                    <tr>
                        <td style='width:50px'></td>
                        <td style='width:110px'>订单商品总额：</td>
                        <td style='width:100px'>{$row['goodsprice']}</td>
                        <td style='width:110px'>快递金额：</td>
                        <td style='width:100px'>{$row['dispatchprice']}</td>
                        <td style='width:110px'>订单改价金额</td>
                        <td style='width:100px'>{$row['changeprice']}</td>
                    </tr>
                    <tr>
                        <td style='width:50px'></td>
                        <td style='width:110px'>积分抵扣金额：</td>
                        <td style='width:100px'>{$row['deductprice']}</td>
                        <td style='width:110px'>余额抵扣金额：</td>
                        <td style='width:100px'>{$row['deductcredit2']}</td>
                        <td style='width:110px'>会员折扣金额：</td>
                        <td style='width:100px'>{$row['discountprice']}</td>
                    </tr>
                    <tr>
                        <td style='width:50px'></td>
                        <td style='width:100px'>总促销金额：</td>
                        <td style='width:100px'>{$row['isdiscountprice']}</td>
                        <td style='width:110px'>满减金额：</td>
                        <td style='width:100px'>{$row['deductenough']}</td>
                        <td style='width:110px'>实际支付金额：</td>
                        <td style='width:100px'>{$row['price']}</td>
                    </tr>
                    <tr>
                        <td style='width:50px'></td>
                        <td style='width:110px'>商户促销金额：</td>
                        <td style='width:100px'>{$row['merchisdiscountprice']}</td>
                        <td style='width:110px'>商户满减金额：</td>
                        <td style='width:100px'>{$row['merchdeductenough']}</td>
                        <td style='width:110px'>商户优惠券金额</td>
                        <td style='width:100px'>{$row['merchcouponprice']}</td>
                    </tr>
                    <tr>
                        <td style='width:50px'></td>
                        <td style='width:110px'>分销佣金：</td>
                        <td style='width:100px'>{$row['commission']}</td>
                        <td style='width:110px'>秒杀优惠：</td>
                        <td style='width:100px'>{$row['seckilldiscountprice']}</td>
                        <td style='width:110px'></td>
                        <td style='width:100px'></td>
                    </tr>
                </table>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
</div>
<script>
    $(function () {
        $(".orderlist td:gt(0)").click(function () {
            var data = $(this).parent(".orderlist").attr('data');
            var id = "orderinfo_" + data;
            $("#"+id).toggle();
        })
    })
</script>